package com.linwen.tips.annotation;


public class MyController {

    public void viewData() {
        if (!User.hasPermission("read")) {
            throw new SecurityException("Insufficient permission to access this resource.");
        }
        // Method implementation
    }

    public void modifyData() {
        if (!User.hasPermission("write")) {
            throw new SecurityException("Insufficient permission to access this resource.");
        }
        // Method implementation
    }

}
